package com.wms.controller;
import com.wms.dto.ConfirmWeightsDto;
import com.wms.pojo.PageResult;
import com.wms.pojo.Result;
import com.wms.service.OutboundOrderWeightsService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/outboundOrderWeights")
@RequiredArgsConstructor
public class OutboundOrderWeightsController {

    private final OutboundOrderWeightsService weightsService;

    @GetMapping
    public Result queryPage(Integer page,Integer pageSize,Integer status,String weightsCode){
        PageResult pageResult = weightsService.queryPage(page,pageSize,status,weightsCode);
        return Result.success(pageResult);
    }

    @PutMapping
    public Result updateById(@RequestBody ConfirmWeightsDto dto){
        weightsService.updateByIdStatus(dto);
        return Result.success();
    }
    
}
    